#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>

using std::vector;
using std::cin;
using std::cout;


void Input(int &n, int &k, vector<vector<int> > &matrix) {
    cin >> n >> k;
    vector<std::pair<int, int> > coordinates(n);
    for (int i = 0; i < n; ++i) {
        cin >> coordinates[i].first >> coordinates[i].second;
    }
    matrix.resize(n);
    for (int i = 0; i < n; ++i) {;
        for (int j = 0; j < n; ++j) {
            if (k*k >= (coordinates[i].first - coordinates[j].first) * (coordinates[i].first - coordinates[j].first) +
                    (coordinates[i].second - coordinates[j].second) * (coordinates[i].second - coordinates[j].second)) {
                matrix[i].push_back(j);
            }
        }
    }
}

void CreateMarks(vector<int> &marks, int n) {
    marks.resize(n, -1);
}

void dfs(vector<vector<int> > &matrix, vector<int> &marks, int n) {
    if(marks[n] + 1)
        return;
    marks[n] = 1;
    for (int i = 0; i < matrix[n].size(); ++i) {
        dfs(matrix, marks, matrix[n][i]);
    }
}

bool check(vector<int> &marks) {
    for (int i = 0; i < marks.size(); ++i) {
        if (!(marks[i] + 1)) {
            return 0;
        }
    }
    return 1;
}

int main() {
    int n, k;
    vector<vector<int> > matrix;
    Input(n, k, matrix);
    vector<int> marks;
    CreateMarks(marks, n);
    dfs(matrix, marks, 0);
    if  (check(marks) ){
        cout << "YES";
    }
    else {
        cout << "NO";
    }
    return 0;
}